using System;
using System.Data;
using System.Web;
using System.Xml;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ReadData : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        XmlDocument xmlDocument = new XmlDocument();
        string fileName = Server.MapPath("Books.xml");
        xmlDocument.Load(fileName);
         
        XmlNodeList xmlNodeList = 
        xmlDocument.GetElementsByTagName("book");
        foreach (XmlNode xmlNode in xmlNodeList)
        {
            Literal1.Text += "ISBN:" + 
            xmlNode.Attributes["ISBN"].Value  + "<br>";
            foreach (XmlElement xmlElement in 
            xmlNode.ChildNodes)
            {
                Literal1.Text += "&nbsp; &nbsp;" + 
                xmlElement.LocalName + ": " + 
                xmlElement.InnerText + "<br>";
            }
        }
                 
        
    }
}
